{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">客服管理</li>
            <li class=""><a href="{:url('admin/cservice/add')}">添加客服</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">

                <form class="layui-form layui-form-pane" action="{:url('admin/cservice/index')}" method="get">
                    <div class="layui-inline">
                        <label class="layui-form-label">关键词</label>
                        <div class="layui-input-inline">
                            <input type="text" name="keyword" value="{$keyword}" placeholder="请输入关键词" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn">搜索</button>
                    </div>
                </form>
                <hr>

                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>用户名</th>
                        <th>密码</th>
                        <th>昵称</th>
                        <th>正在对接</th>
                        <th>在线状态</th>
                        <th>客服状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="csuser" item="v"}
                    <tr>
                        <td>{$v.id}</td>
                        <td>{$v.username}</td>
                        <td>{$v.password}</td>
                        <td>{$v.nickname}</td>
                        <td>{$v.online_butt}</td>
                        <td>{:config('type')[$v.type]}</td>
                        <td>{:config('status')[$v.status]}</td>
                        <td>
                            <a href="{:url('admin/user/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-mini">编辑</a>
                            <a href="{:url('admin/user/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <!--分页-->
            </div>
        </div>
    </div>
</div>
{/block}